﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VirtualLockerRoom.aspx.cs" Inherits="_2011DBProject.WebForm1" %>

<link rel=StyleSheet HREF='design1.css' type='text/css'>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>새벽 골프</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
            <p align =left>
        <asp:Button ID="btnGoLogout" runat="server" onclick="btnGoLogout_onclick" 
            Text="☜ 로 그 아 웃" Width="150px" />
        <asp:Button ID="btnGoServer" runat="server" onclick="btnGoServer_onclick" 
            Text="☜ 서 버 선 택" Width="150px" />
            </p>
        <br />
        <br />
        <br />
        <br />
        <asp:Label ID="lblUserID" runat="server" Text="Label" Font-Size="30pt" 
            ForeColor="#FFFF99"></asp:Label>&nbsp;<asp:Label ID="Label7" runat="server" Font-Size="25pt" 
            ForeColor="#9EDCFF" Text="님의 가상 락커룸 아이템"></asp:Label>
        <br />
        <br />
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            CellPadding="4" DataSourceID="SqlDataSource2" ForeColor="#333333" 
            GridLines="None" HorizontalAlign="Center" DataKeyNames="ITEM_NO,QTY"
            onselectedindexchanged="GridView2_SelectedIndexChanged">
            <RowStyle BackColor="#EFF3FB" />
            <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <asp:BoundField DataField="ITEM_NO" HeaderText="아이템번호" 
                    SortExpression="ITEM_NO" />
                <asp:BoundField DataField="ITEM_NAME" HeaderText="아이템이름" 
                    SortExpression="ITEM_NAME">
                <HeaderStyle Width="200px" />
                </asp:BoundField>
                <asp:BoundField DataField="POWER_CORRECTION" HeaderText="+파워" 
                    SortExpression="POWER_CORRECTION" />
                <asp:BoundField DataField="IMPACT_CORRECTION" HeaderText="+임팩" 
                    SortExpression="IMPACT_CORRECTION" />
                <asp:BoundField DataField="TECHNIQUE_CORRECTION" HeaderText="+기술" 
                    SortExpression="TECHNIQUE_CORRECTION" />
                <asp:BoundField DataField="STRENGTH_CORRECTION" HeaderText="+체력" 
                    SortExpression="STRENGTH_CORRECTION" />
                <asp:BoundField DataField="QTY" HeaderText="수량" SortExpression="QTY" />
            </Columns>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <EmptyDataTemplate>
                <br />
                <font color="#ffff99">가상 락커룸에 아이템이 없습니다.</font><br />
            </EmptyDataTemplate>
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT V.ITEM_NO, V.QTY, I.ITEM_NAME, I.POWER_CORRECTION, I.IMPACT_CORRECTION, I.TECHNIQUE_CORRECTION, I.STRENGTH_CORRECTION
FROM VIRTUAL_LOCKERROOM V, ITEM I
WHERE V.ITEM_NO = I.ITEM_NO and V.ACCOUNT_ID = :ACCOUNT_ID">
            <SelectParameters>
                <asp:SessionParameter Name="ACCOUNT_ID" SessionField="USER" />
            </SelectParameters>
        </asp:SqlDataSource>
        <br />
        <br />
        <asp:Label ID="lblMsg1" runat="server" Text="선택한 아이템을" Visible="False"></asp:Label>
        <asp:DropDownList ID="DropDownList1" runat="server" 
            DataSourceID="SqlDataSource3" DataTextField="SERVER_NAME" 
            DataValueField="SERVER_NO" AutoPostBack="True" 
                onselectedindexchanged="DropDownList1_SelectedIndexChanged" 
                Visible="False">
        </asp:DropDownList>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT &quot;SERVER_NAME&quot;, &quot;SERVER_NO&quot; FROM &quot;SERVER&quot;">
        </asp:SqlDataSource>
        <asp:Label ID="lblMsg2" runat="server" Text="서버의" Visible="False"></asp:Label>
&nbsp;<asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="SqlDataSource4" 
            DataTextField="CHARACTER_NAME" DataValueField="CHARACTER_NAME" Visible="False">
        </asp:DropDownList>
        <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            
                SelectCommand="SELECT C.CHARACTER_NAME
FROM CHARACTER C, SERVER S
WHERE C.SERVER_NO=S.SERVER_NO AND S.SERVER_NO = :SERVER_NO AND C.TITLE_NO &lt;&gt; 9 AND C.ACCOUNT_ID = :ACCOUNT_ID">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropDownList1" Name="SERVER_NO" 
                    PropertyName="SelectedValue" />
                <asp:SessionParameter Name="ACCOUNT_ID" SessionField="USER" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:Label ID="lblMsg3" runat="server" Text="캐릭에게 넣어주기" Visible="False"></asp:Label>
            <asp:Button ID="btnSendItem" runat="server" onclick="btnSendItem_Click" 
                Text="아이템 보내기" Visible="False" />
        <br />
        <br />
        <br />
        <asp:Label ID="lblHid" runat="server" Font-Size="X-Large" ForeColor="#FFCC66" 
            Visible="False">정상적으로 아이템을 보냈습니다.</asp:Label>

        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
        <br />
    </div>
    <br /></form>
</body>
</html>
